package com.tmt.im.wallet.controler.vo;

import com.tmt.im.common.enums.RedPackageType;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Description TODO
 * @Author wuyi
 * @Date 2024/9/2 14:43
 * @Version 1.0
 **/
@Getter
@Setter
@Tag(name = "NewRedPackageRequest", description = "新红包发送请求对象")
public class NewRedPackageRequest implements Serializable {

    @Serial
    private static final long serialVersionUID = -2137394597176077354L;

    @NotNull(message = "红包类型不能为null")
    @Schema(name = "type", description = "新增红包的类型")
    private RedPackageType type;

    @Length(max = 20,message = "标题过长")
    @Schema(name = "title", description = "红包的标题")
    @NotNull(message = "标题不能为null")
    @NotBlank(message = "标题不能为空串")
    private String title;

    @Schema(name = "skinId", description = "选择使用的红包皮肤")
    @Nullable
    private Long skinId;

    @NotNull(message = "红包额度不能为null")
    @Min(value = 100, message = "最少需要1元")
    @Schema(name = "amount", description = "红包的额度, 单位: 分")
    private Long amount;

    @Min(value = 1, message = "最少允许1个人领取红包")
    @Schema(name = "splitCount", description = "领取红包的人数, 个人红包和专属红包设置为1，手气红包按实际需要设置")
    private Integer splitCount;

    @Schema(name = "receiverIds", description = "红包领取人ID列表, 用于个人红包和专属红包")
    @Nullable
    private List<Long> receiverIds;

    @Schema(name = "sessionId", description = "群组ID, 用于专属红包和手气红包")
    @Nullable
    private Long sessionId;

    @Schema(name = "payPassword", description = "支付密码")
    @NotNull(message = "支付密码不能为null")
    @NotBlank(message = "支付密码不能为空串")
    private String payPassword;

}
